<div class="md">
    <h2>历史文档</h2>
    <div class="position-right">
        <a href="javascript:" *ngIf="hasChecked()" (click)="deleteDocLogs()">批量删除</a>
    </div>
    <table class="table">
        <thead>
        <tr>
            <th *ngIf="isOwner">
                <input type="checkbox" (click)="toggleSelectAll()" value="1" [checked]="selectAll">
            </th>
            <th>坐标</th>
            <th>版本号</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody *ngIf="docs">
        <tr *ngFor="let doc of docs">
            <td class="align-center" *ngIf="isOwner">
                <input type="checkbox" name="ids" value="{{doc.id}}" *ngIf="!isNewest(doc)" [(ngModel)]="doc.checked" [checked]="doc.checked">
            </td>
            <td>{{doc.docId + ':' + doc.version}}</td>
            <td>{{getVersion(doc.docVersion)}}</td>
            <td></td>
            <td>
                <a [routerLink]="getRouterLink(doc)">查看</a>
                <ng-container *ngIf="isOwner && !isNewest(doc)">
                    | <a href="javascript:" class="" (click)="deleteDocLog(doc)">删除</a>
                </ng-container>

            </td>
        </tr>
        </tbody>
        <tbody *ngIf="!docs">
            <tr>
                <td colspan="5" [innerHTML]="loaddingMessage"></td>
            </tr>
        </tbody>
    </table>

    <div class="align-right" id="pager" *ngIf="docs">
        <a *ngIf="pageNo > 2" href="javascript:" (click)="loadPage(1)">第一页</a>
        <a *ngIf="pageNo > 1" href="javascript:" (click)="loadPage(pageNo - 1)">上一页</a>
        <span>{{pageNo}}</span>
        <a *ngIf="hasNextPage" href="javascript:" (click)="loadPage(pageNo + 1)">下一页</a>
    </div>
</div>
